package org.ytor.common.util.json;

import org.ytor.common.util.json.status.*;

/**
 * created by yangtong on 2025/4/14 22:40:52
 * <br/>
 * 表示读取json字符串过程中的不同状态
 */
public interface JsonState {

    JsonState START = new StartState();
    JsonState EXPECT_KEY = new ExpectKeyState();
    JsonState IN_KEY = new InKeyState();
    JsonState EXPECT_COLON = new ExpectColonState();
    JsonState EXPECT_VALUE = new ExpectValueState();
    JsonState IN_STRING_VALUE = new InStringValueState();
    JsonState IN_NUMBER_VALUE = new InNumberValueState();
    JsonState IN_LITERAL_VALUE = new InLiteralValueState();
    JsonState IN_ARRAY_VALUE = new InArrayValueState();
    JsonState EXPECT_COMMA_OR_END = new ExpectCommaOrEndState();
    JsonState END = new EndState();

    void handle(JsonFsm fsm, char c);
}
